import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import LoginView from "../views/LoginView.vue"; // 引入 LoginView
import HomeView from "../views/HomeView.vue"; // 引入 HomeView
// import ParkingOverView from "../views/ParkingOverView.vue";
import RegisterPage from "../views/RegisterPage.vue";
import ResetPassword from "@/views/ResetPasswordPage.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "login",
    component: LoginView, // 将默认页面设为 LoginView
  },
  {
    path: "/home",
    name: "home",
    component: HomeView, // 将 HomeView 设置为第二页
  },
  {
    path: "/about",
    name: "about",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/AboutView.vue"), // 第三页 AboutView
  },
  {
    path: "/list",
    name: "list",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/ListView.vue"), // 第三页 AboutView
  },
  // {
  //   path: "/parking-overview",
  //   name: "parking-overview",
  //   component: ParkingOverView,
  // },
  // {
  //   path: "/video-statistics",
  //   name: "video-statistics-dashboard",
  //   component: () =>
  //     import(
  //       /* webpackChunkName: "video-statistics-dashboard" */ "../views/VideoStatisticsDashboard.vue"
  //     ),
  // },
  {
    path: "/register",
    name: "register",
    component: RegisterPage,
  },
  {
    path: "/forgot-password",
    name: "forgot-password",
    component: ResetPassword,
  },
];

const router = createRouter({
  history: createWebHashHistory(), // 使用 Hash 模式
  routes,
});

export default router;
